load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "parse",
    srcs = ["parse.go"],
    importpath = "github.com/pingcap/tidb/pkg/server/internal/parse",
    visibility = ["//pkg/server:__subpackages__"],
    deps = [
        "//pkg/parser/mysql",
        "//pkg/server/internal/handshake",
        "//pkg/server/internal/util",
        "//pkg/util/logutil",
        "@org_uber_go_zap//:zap",
    ],
)

go_test(
    name = "parse_test",
    timeout = "short",
    srcs = [
        "handshake_test.go",
        "parse_test.go",
    ],
    embed = [":parse"],
    flaky = True,
    deps = [
        "//pkg/parser/mysql",
        "//pkg/server/internal/handshake",
        "@com_github_stretchr_testify//require",
    ],
)
